home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / winter_challenge.swf / scripts / DefineSprite_225 / frame_1 / PlaceObject2_224_1 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Text File  |  2011-08-19  |  1KB  |  43 lines

  1. onClipEvent(enterFrame){
  2.    randomVar = random(50);
  3.    if(randomVar >= 40)
  4.    {
  5.       if(doHoppel_flag != 1)
  6.       {
  7.          _parent._rotation = random(360);
  8.          radian = _parent._rotation * 0.017453292519943295;
  9.          doHoppel_flag = 1;
  10.       }
  11.    }
  12.    if(doHoppel_flag == 1 && gothit_flag != 1)
  13.    {
  14.       doHoppel();
  15.    }
  16.    if(_parent.hitTest(_root.ATVclip.ATV.chassis) && gothit_flag != 1)
  17.    {
  18.       this.gotoAndPlay(4);
  19.       gothit_flag = 1;
  20.       if(_root.redTire_cheat == 0)
  21.       {
  22.          _parent.vektor = [_root.ATVclip.xspeed * (1 + random(1.5)),_root.ATVclip.yspeed * (1 + random(1.5))];
  23.          if(_root.ATVclip.xspeed > 0)
  24.          {
  25.             _root.ATVclip.xspeed -= _root.ATVclip.xspeed / 2;
  26.          }
  27.          if(_root.ATVclip.xspeed < 0)
  28.          {
  29.             _root.ATVclip.xspeed -= _root.ATVclip.xspeed / 2;
  30.          }
  31.          if(_root.ATVclip.yspeed < 0)
  32.          {
  33.             _root.ATVclip.yspeed -= _root.ATVclip.yspeed / 2;
  34.          }
  35.          if(_root.ATVclip.yspeed > 0)
  36.          {
  37.             _root.ATVclip.yspeed -= _root.ATVclip.yspeed / 2;
  38.          }
  39.          _root.rabbitKills = _root.rabbitKills + 1;
  40.       }
  41.    }
  42. }
  43.